package com.example.demo.entity;

import java.util.List;

public class User {
    private Long userId;          // 9位唯一用户ID
    private String username;     // 用户名
    private String password;     // 密码
    private String gender;       // 性别
    private String avatar;       // 头像URL
    private List<Long> followers; // 被关注列表(粉丝)
    private List<Long> following; // 关注列表(关注的人)

    // 构造方法
    public User() {
    }

    public User(Long userId, String username, String password, String gender, String avatar) {
        this.userId = userId;
        this.username = username;
        this.password = password;
        this.gender = gender;
        this.avatar = avatar;
    }

    // Getter和Setter方法
    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public List<Long> getFollowers() {
        return followers;
    }

    public void setFollowers(List<Long> followers) {
        this.followers = followers;
    }

    public List<Long> getFollowing() {
        return following;
    }

    public void setFollowing(List<Long> following) {
        this.following = following;
    }

    @Override
    public String toString() {
        return "User{" +
                "userId=" + userId +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", gender='" + gender + '\'' +
                ", avatar='" + avatar + '\'' +
                ", followers=" + followers +
                ", following=" + following +
                '}';
    }
}